package com.example.skillcinema.db.localdb

import androidx.room.Database
import androidx.room.RoomDatabase
import com.example.skillcinema.db.localdb.daos.CollectionDao
import com.example.skillcinema.db.localdb.daos.FilmCollectionCrossRefDao
import com.example.skillcinema.db.localdb.daos.FilmDao
import com.example.skillcinema.db.localdb.daos.HistoryDao
import com.example.skillcinema.db.localdb.tables.CollectionEntity
import com.example.skillcinema.db.localdb.tables.FilmCollectionCrossRef
import com.example.skillcinema.db.localdb.tables.FilmEntity
import com.example.skillcinema.db.localdb.tables.HistoryEntity
import javax.inject.Singleton

@Singleton
@Database(
    entities = [FilmEntity::class, CollectionEntity::class, FilmCollectionCrossRef::class, HistoryEntity::class],
    version = 1,
    exportSchema = false
)
abstract class ApplicationDataBase : RoomDatabase() {
    abstract fun collectionDao(): CollectionDao
    abstract fun filmDao(): FilmDao
    abstract fun historyDao(): HistoryDao
    abstract fun filmCollectionCrossRefDao(): FilmCollectionCrossRefDao
}